package com.project.service.impl;

import com.project.bean.PrimaryPostBean;
import com.project.mapper.IPrimaryMapper;
import com.project.service.IPrimaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class PrimaryServiceImpl implements IPrimaryService {
    @Autowired
    private IPrimaryMapper mapper;

    @Override
    public List<PrimaryPostBean> findAll() {
        return mapper.findAll();
    }

    @Override
    public PrimaryPostBean findById(int id) {
        return mapper.findById(id);
    }

    @Override
    public void add(PrimaryPostBean primary) {
        mapper.add(primary);
    }
}
